package cn.iocoder.yudao.module.chat.mq.gpt.producer.response;

import cn.iocoder.yudao.framework.mq.core.RedisMQTemplate;
import cn.iocoder.yudao.module.chat.mq.gpt.message.response.GPTResponseSendMessage;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class GPTResponseProducer {

    @Resource
    private RedisMQTemplate redisMQTemplate;

    public void sendGPTResponseMessage(String sessionId,String content){
        GPTResponseSendMessage gptResponseSendMessage = new GPTResponseSendMessage();
        gptResponseSendMessage.setSessionId(sessionId);
        gptResponseSendMessage.setContent(content);
        redisMQTemplate.send(gptResponseSendMessage);

    }
}
